<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="Beans.OrderForm" import="Beans.OpenRoom" import="DaosImpl.OrderDaoImpl" %>
<html>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	%>
  <head>
    <meta charset="UTF-8">
    <title>个人订单</title>
    <link href=<%=basePath+"/stylesheets/reserveInfo.css"%> type="text/css" rel="stylesheet">
    <style>
        html,body{
            height: 100%;
            margin:0;
            padding: 0;
        }
    </style>

  </head>
  
  <body>
    <div id="themeText">个人订单信息查看</div>
	<div id="showRoomFrame">
    	<table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th>订单编号</th>
                <th>顾客姓名</th>
                <th>房号</th>
                <th>支付金额</th>
                <th>租期</th>
                <th>离开日期</th>
            </tr>
        </thead>
        <tbody>
            <%
            	String account = (String)request.getAttribute("name");
            	account = (String)session.getAttribute("account");
            	System.out.println("zlsname="+account);
            	OrderDaoImpl orderDao = new OrderDaoImpl();
            	ArrayList<OrderForm> orderList = new ArrayList<OrderForm>();
            	orderList = orderDao.queryMyOrder(account);
            	for(int i = 0;i<orderList.size();i++){
            		%>
            		<tr>
			                <td width="15%"><%=orderList.get(i).getOfID() %></td>
			                <td width="15%"><%=orderList.get(i).getName() %></td>
			                <td width="15%"><%=orderList.get(i).getRoomid() %></td>
			                <td width="10%"><%=orderList.get(i).getOfPayMoney() %></td>
			                <td width="20%"><%=orderList.get(i).getOfInDate() %>至<%=orderList.get(i).getOfWantOutDate() %></td>
			                <td width="15%"><%=orderList.get(i).getOfOutDate() %></td>
            		</tr>
            		<%
            	}
             %>
        </tbody>
    </table>
  </body>
</html>
